<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>GitBlit的安装及使用 | anyang的博客</title>
    <meta name="description" content="千里之行,始于足下">
    <meta name="generator" content="VuePress 1.3.1">
    <link rel="icon" href="/img/favicon.ico">
  <script charset="utf-8" src="/js/main.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.js"></script>
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.css">
  <meta name="keywords" content="福小林,奔奔,ourLang,CentOS,JAVA,vue组件,lsdCloud">
  <script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-146891701-1"></script>
  <script>window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-146891701-1');</script>
  <script>var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?56eae8eec590ccaef1d5ff99d766f315";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();</script>
    
    <link rel="preload" href="/assets/css/0.styles.9fff9873.css" as="style"><link rel="preload" href="/assets/js/app.1bc80adb.js" as="script"><link rel="preload" href="/assets/js/2.7c0608ab.js" as="script"><link rel="preload" href="/assets/js/46.81b7f108.js" as="script"><link rel="prefetch" href="/assets/js/10.81caa2ab.js"><link rel="prefetch" href="/assets/js/100.05bb269d.js"><link rel="prefetch" href="/assets/js/101.3e18b4d6.js"><link rel="prefetch" href="/assets/js/102.c7d7ed9c.js"><link rel="prefetch" href="/assets/js/103.4c771ce7.js"><link rel="prefetch" href="/assets/js/104.a2acd367.js"><link rel="prefetch" href="/assets/js/105.63399350.js"><link rel="prefetch" href="/assets/js/106.8a4744cc.js"><link rel="prefetch" href="/assets/js/107.7739d796.js"><link rel="prefetch" href="/assets/js/108.8008ae33.js"><link rel="prefetch" href="/assets/js/109.01c63898.js"><link rel="prefetch" href="/assets/js/11.7b837560.js"><link rel="prefetch" href="/assets/js/110.ad01aca9.js"><link rel="prefetch" href="/assets/js/111.3d74db70.js"><link rel="prefetch" href="/assets/js/112.67f55c34.js"><link rel="prefetch" href="/assets/js/113.016cd3c0.js"><link rel="prefetch" href="/assets/js/114.860e4b2b.js"><link rel="prefetch" href="/assets/js/115.b2f26258.js"><link rel="prefetch" href="/assets/js/116.8bea67b4.js"><link rel="prefetch" href="/assets/js/117.20682843.js"><link rel="prefetch" href="/assets/js/118.86a22e16.js"><link rel="prefetch" href="/assets/js/119.ad518bea.js"><link rel="prefetch" href="/assets/js/12.8fd78714.js"><link rel="prefetch" href="/assets/js/120.f97dd86f.js"><link rel="prefetch" href="/assets/js/121.c5601b4a.js"><link rel="prefetch" href="/assets/js/122.2889645a.js"><link rel="prefetch" href="/assets/js/13.ebf26820.js"><link rel="prefetch" href="/assets/js/14.b92dca09.js"><link rel="prefetch" href="/assets/js/15.b3dcef45.js"><link rel="prefetch" href="/assets/js/16.50378990.js"><link rel="prefetch" href="/assets/js/17.056bba2b.js"><link rel="prefetch" href="/assets/js/18.9047bb38.js"><link rel="prefetch" href="/assets/js/19.ab53b0fe.js"><link rel="prefetch" href="/assets/js/20.fe0b8af0.js"><link rel="prefetch" href="/assets/js/21.20a702f3.js"><link rel="prefetch" href="/assets/js/22.0ee08d29.js"><link rel="prefetch" href="/assets/js/23.02039a9a.js"><link rel="prefetch" href="/assets/js/24.363d3d74.js"><link rel="prefetch" href="/assets/js/25.dd6b101e.js"><link rel="prefetch" href="/assets/js/26.20493714.js"><link rel="prefetch" href="/assets/js/27.708723e5.js"><link rel="prefetch" href="/assets/js/28.4561834a.js"><link rel="prefetch" href="/assets/js/29.15cfcf5f.js"><link rel="prefetch" href="/assets/js/3.8d39d40c.js"><link rel="prefetch" href="/assets/js/30.04ab69de.js"><link rel="prefetch" href="/assets/js/31.b11c4302.js"><link rel="prefetch" href="/assets/js/32.81ae74ee.js"><link rel="prefetch" href="/assets/js/33.ddf09cc0.js"><link rel="prefetch" href="/assets/js/34.bc3549f7.js"><link rel="prefetch" href="/assets/js/35.4a0e0ebd.js"><link rel="prefetch" href="/assets/js/36.961a1c50.js"><link rel="prefetch" href="/assets/js/37.d8658de5.js"><link rel="prefetch" href="/assets/js/38.f76063aa.js"><link rel="prefetch" href="/assets/js/39.73edd08f.js"><link rel="prefetch" href="/assets/js/4.916af9bf.js"><link rel="prefetch" href="/assets/js/40.72314bff.js"><link rel="prefetch" href="/assets/js/41.c5eb1147.js"><link rel="prefetch" href="/assets/js/42.07aeafbb.js"><link rel="prefetch" href="/assets/js/43.c4a652ba.js"><link rel="prefetch" href="/assets/js/44.91fbe22b.js"><link rel="prefetch" href="/assets/js/45.6eecf0c4.js"><link rel="prefetch" href="/assets/js/47.b4468ab3.js"><link rel="prefetch" href="/assets/js/48.df205f23.js"><link rel="prefetch" href="/assets/js/49.7df59fa3.js"><link rel="prefetch" href="/assets/js/5.4fcd540a.js"><link rel="prefetch" href="/assets/js/50.0dc2fc5b.js"><link rel="prefetch" href="/assets/js/51.1ffabe54.js"><link rel="prefetch" href="/assets/js/52.2269d284.js"><link rel="prefetch" href="/assets/js/53.81b23843.js"><link rel="prefetch" href="/assets/js/54.b3249def.js"><link rel="prefetch" href="/assets/js/55.50dcf2af.js"><link rel="prefetch" href="/assets/js/56.c399c272.js"><link rel="prefetch" href="/assets/js/57.024f1dbb.js"><link rel="prefetch" href="/assets/js/58.680c6cf4.js"><link rel="prefetch" href="/assets/js/59.2291e9d7.js"><link rel="prefetch" href="/assets/js/6.7610d1d4.js"><link rel="prefetch" href="/assets/js/60.e59a26c1.js"><link rel="prefetch" href="/assets/js/61.ff5c64e4.js"><link rel="prefetch" href="/assets/js/62.7d97062c.js"><link rel="prefetch" href="/assets/js/63.6456dc7e.js"><link rel="prefetch" href="/assets/js/64.0b055680.js"><link rel="prefetch" href="/assets/js/65.9f25601c.js"><link rel="prefetch" href="/assets/js/66.cd973084.js"><link rel="prefetch" href="/assets/js/67.9b8f9716.js"><link rel="prefetch" href="/assets/js/68.d6c1869a.js"><link rel="prefetch" href="/assets/js/69.0a3688dd.js"><link rel="prefetch" href="/assets/js/7.9ebbd956.js"><link rel="prefetch" href="/assets/js/70.22f48891.js"><link rel="prefetch" href="/assets/js/71.9eb4fda9.js"><link rel="prefetch" href="/assets/js/72.ca4fa80c.js"><link rel="prefetch" href="/assets/js/73.17d1ab37.js"><link rel="prefetch" href="/assets/js/74.139691db.js"><link rel="prefetch" href="/assets/js/75.08d0560f.js"><link rel="prefetch" href="/assets/js/76.61078c10.js"><link rel="prefetch" href="/assets/js/77.4482adcc.js"><link rel="prefetch" href="/assets/js/78.166f2c37.js"><link rel="prefetch" href="/assets/js/79.2c7d6b79.js"><link rel="prefetch" href="/assets/js/8.6f8916c2.js"><link rel="prefetch" href="/assets/js/80.80445c3f.js"><link rel="prefetch" href="/assets/js/81.14e3bae8.js"><link rel="prefetch" href="/assets/js/82.7dac687f.js"><link rel="prefetch" href="/assets/js/83.1dd2e78e.js"><link rel="prefetch" href="/assets/js/84.23b759de.js"><link rel="prefetch" href="/assets/js/85.7574f69f.js"><link rel="prefetch" href="/assets/js/86.102dac61.js"><link rel="prefetch" href="/assets/js/87.8f5d639e.js"><link rel="prefetch" href="/assets/js/88.e564cbbe.js"><link rel="prefetch" href="/assets/js/89.cd66eb78.js"><link rel="prefetch" href="/assets/js/9.baa162db.js"><link rel="prefetch" href="/assets/js/90.685c6878.js"><link rel="prefetch" href="/assets/js/91.b8d1b7ea.js"><link rel="prefetch" href="/assets/js/92.1faa374d.js"><link rel="prefetch" href="/assets/js/93.cf5ff33c.js"><link rel="prefetch" href="/assets/js/94.8a02aefb.js"><link rel="prefetch" href="/assets/js/95.1b379a5b.js"><link rel="prefetch" href="/assets/js/96.9fd67185.js"><link rel="prefetch" href="/assets/js/97.c5a6a5a1.js"><link rel="prefetch" href="/assets/js/98.9a231411.js"><link rel="prefetch" href="/assets/js/99.5b344cab.js">
    <link rel="stylesheet" href="/assets/css/0.styles.9fff9873.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">anyang的博客</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">
  主页
</a></div><div class="nav-item"><a href="/study-guide/introduction.html" class="nav-link">
  学习指南
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="技术分类" class="dropdown-title"><span class="title">技术分类</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/java/introduction.html" class="nav-link">
  Java
</a></li><li class="dropdown-item"><!----> <a href="/go/introduction.html" class="nav-link">
  Go
</a></li><li class="dropdown-item"><!----> <a href="/sql/introduction.html" class="nav-link">
  SQL
</a></li><li class="dropdown-item"><!----> <a href="/fhir/introduction.html" class="nav-link">
  FHIR
</a></li></ul></div></div><div class="nav-item"><a href="/blog/introduction.html" class="nav-link">
  个人博客
</a></div><div class="nav-item"><a href="/tool/developmentBox.html" class="nav-link">
  开发百宝箱
</a></div><div class="nav-item"><a href="/project/introduction.html" class="nav-link">
  项目分享
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1300378587&amp;site=qq&amp;menu=yes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  其他合作
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="http://www.lsdcloud.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  友情网站
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://github.com/ourlang" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/anlexanyang" target="_blank" rel="noopener noreferrer" class="nav-link external">
  码云
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/qq_37493556" target="_blank" rel="noopener noreferrer" class="nav-link external">
  CSDN
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div><div class="nav-item"><a href="/linkExchanges/introduction.html" class="nav-link">
  友情链接
</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
  主页
</a></div><div class="nav-item"><a href="/study-guide/introduction.html" class="nav-link">
  学习指南
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="技术分类" class="dropdown-title"><span class="title">技术分类</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/java/introduction.html" class="nav-link">
  Java
</a></li><li class="dropdown-item"><!----> <a href="/go/introduction.html" class="nav-link">
  Go
</a></li><li class="dropdown-item"><!----> <a href="/sql/introduction.html" class="nav-link">
  SQL
</a></li><li class="dropdown-item"><!----> <a href="/fhir/introduction.html" class="nav-link">
  FHIR
</a></li></ul></div></div><div class="nav-item"><a href="/blog/introduction.html" class="nav-link">
  个人博客
</a></div><div class="nav-item"><a href="/tool/developmentBox.html" class="nav-link">
  开发百宝箱
</a></div><div class="nav-item"><a href="/project/introduction.html" class="nav-link">
  项目分享
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1300378587&amp;site=qq&amp;menu=yes" target="_blank" rel="noopener noreferrer" class="nav-link external">
  其他合作
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="http://www.lsdcloud.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  友情网站
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://github.com/ourlang" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/anlexanyang" target="_blank" rel="noopener noreferrer" class="nav-link external">
  码云
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/qq_37493556" target="_blank" rel="noopener noreferrer" class="nav-link external">
  CSDN
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div><div class="nav-item"><a href="/linkExchanges/introduction.html" class="nav-link">
  友情链接
</a></div> <!----></nav>  <ul class="sidebar-links"><li><a href="/blog/introduction.html" class="sidebar-link">博主介绍</a></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Go</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Java</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>CentOS</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>数据库</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>正则表达式</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>版本控制器</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/blog/VersionController/Git操作之本地commit，未push到远程.html" class="sidebar-link">Git操作之本地commit，未push到远程</a></li><li><a href="/blog/VersionController/IDEA恢复已删除的文件.html" class="sidebar-link">IDEA恢复已删除的文件</a></li><li><a href="/blog/VersionController/IDEA项目版本控制器有svn变成git操作流程.html" class="sidebar-link">IDEA项目由svn变成git操作流程</a></li><li><a href="/blog/VersionController/install-GitBlit.html" class="active sidebar-link">GitBlit的安装及使用</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_1-软件下载" class="sidebar-link">1 软件下载</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_2-搭建jdk环境" class="sidebar-link">2 搭建jdk环境</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_2-1-安装jdk" class="sidebar-link">2.1 安装jdk</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_2-2配置java环境变量" class="sidebar-link">2.2配置java环境变量</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_2-3-验证jdk是否安装成功" class="sidebar-link">2.3 验证jdk是否安装成功</a></li></ul></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_3-安装gitblit" class="sidebar-link">3 安装GitBlit</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_3-1-解压安装" class="sidebar-link">3.1 解压安装</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_3-2-创建用于存储资料的文件夹" class="sidebar-link">3.2 创建用于存储资料的文件夹</a></li></ul></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_4-gitblit配置" class="sidebar-link">4 GitBlit配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_4-1-修改defaults-properties文件" class="sidebar-link">4.1 修改defaults.properties文件</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_4-2-修改installservice-cmd文件" class="sidebar-link">4.2 修改installService.cmd文件</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_4-3-查看登录用户名密码" class="sidebar-link">4.3 查看登录用户名密码</a></li></ul></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_5-启动gitblit服务" class="sidebar-link">5 启动GitBlit服务</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_6-访问gitblit和简单操作" class="sidebar-link">6 访问GitBlit和简单操作</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_6-1-gitblit功能简介" class="sidebar-link">6.1 GitBlit功能简介</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_6-2-创建版本库" class="sidebar-link">6.2 创建版本库</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_6-3-git克隆地址" class="sidebar-link">6.3 Git克隆地址</a></li><li class="sidebar-sub-header"><a href="/blog/VersionController/install-GitBlit.html#_6-4-更多操作说明" class="sidebar-link">6.4 更多操作说明</a></li></ul></li></ul></li><li><a href="/blog/VersionController/SVN修改远程地址报E155024.html" class="sidebar-link">SVN修改远程地址报E155024</a></li><li><a href="/blog/VersionController/如何在IDEA中用git提交设置忽略文件的方法.html" class="sidebar-link">IDEA中用git提交设置忽略文件的方法</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>ElasticSearch</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Spring Cloud Alibaba</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="gitblit的安装及使用"><a href="#gitblit的安装及使用" class="header-anchor">#</a> GitBlit的安装及使用</h1> <div class="custom-block tip"><p class="custom-block-title">安装说明</p> <p>本文是基于Windows系统环境,安装和测试GitBlit,从而在Windows平台下搭建Git服务器。需要如下软件</p> <ul><li>jdk-8u181-windows-x64</li> <li>gitblit-1.8.0.zip</li></ul></div> <h2 id="_1-软件下载"><a href="#_1-软件下载" class="header-anchor">#</a> 1 软件下载</h2> <p>官网下载速度有点慢，个人推荐<a href="https://pan.baidu.com/s/1NF-YSPiw6VXPbywCItqdMg" target="_blank" rel="noopener noreferrer">百度网盘下载<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>,提取码：u8dw</p> <p><a href="https://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk" target="_blank" rel="noopener noreferrer">jdk-8u181-windows-x64<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <p><a href="http://www.gitblit.com/" target="_blank" rel="noopener noreferrer">gitblit-1.8.0.zip<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <h2 id="_2-搭建jdk环境"><a href="#_2-搭建jdk环境" class="header-anchor">#</a> 2 搭建jdk环境</h2> <blockquote><p>安装<code>GitBlit</code>，是需要<code>jdk</code>环境的。</p></blockquote> <h3 id="_2-1-安装jdk"><a href="#_2-1-安装jdk" class="header-anchor">#</a> 2.1 安装jdk</h3> <p>双击安装文件一直下一步即可</p> <h3 id="_2-2配置java环境变量"><a href="#_2-2配置java环境变量" class="header-anchor">#</a> 2.2配置java环境变量</h3> <h4 id="新建环境变量java-home"><a href="#新建环境变量java-home" class="header-anchor">#</a> 新建环境变量JAVA_HOME</h4> <div class="language-xml line-numbers-mode"><pre class="language-xml"><code>变量名：JAVA_HOME
变量值：C:\Program Files\Java\jdk1.8.0_181【要根据jdk安装路径进行配置】
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p><a data-fancybox="" title="jdk8" href="/img/blogImage/jdk8.png"><img src="/img/blogImage/jdk8.png" alt="jdk8"></a> <a data-fancybox="" title="jdk9" href="/img/blogImage/jdk9.png"><img src="/img/blogImage/jdk9.png" alt="jdk9"></a></p> <h4 id="新建环境变量classpath"><a href="#新建环境变量classpath" class="header-anchor">#</a> 新建环境变量CLASSPATH</h4> <div class="language-xml line-numbers-mode"><pre class="language-xml"><code>变量名：CLASSPATH
变量值：.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p><a data-fancybox="" title="jdk10" href="/img/blogImage/jdk10.png"><img src="/img/blogImage/jdk10.png" alt="jdk10"></a></p> <h4 id="编辑环境变量path"><a href="#编辑环境变量path" class="header-anchor">#</a> 编辑环境变量PATH</h4> <blockquote><p>找到PATH变量，选择编辑。把<code>%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin</code>添加到”变量值”的结尾处。</p></blockquote> <p><a data-fancybox="" title="jdk11" href="/img/blogImage/jdk11.png"><img src="/img/blogImage/jdk11.png" alt="jdk11"></a></p> <h3 id="_2-3-验证jdk是否安装成功"><a href="#_2-3-验证jdk是否安装成功" class="header-anchor">#</a> 2.3 验证jdk是否安装成功</h3> <blockquote><p>打开命令提示符 按组合快捷键“win+ R”打开运行 输入cmd。
输入<code>java -version</code> 如图即为成功</p></blockquote> <p><a data-fancybox="" title="jdk12" href="/img/blogImage/jdk12.png"><img src="/img/blogImage/jdk12.png" alt="jdk12"></a></p> <h2 id="_3-安装gitblit"><a href="#_3-安装gitblit" class="header-anchor">#</a> 3 安装GitBlit</h2> <h3 id="_3-1-解压安装"><a href="#_3-1-解压安装" class="header-anchor">#</a> 3.1 解压安装</h3> <blockquote><p><code>GitBlit</code>不要安装，秩序解压缩下载的压缩包即可，请不要放在系统盘</p></blockquote> <h3 id="_3-2-创建用于存储资料的文件夹"><a href="#_3-2-创建用于存储资料的文件夹" class="header-anchor">#</a> 3.2 创建用于存储资料的文件夹</h3> <blockquote><p>创建存储资料的文件夹，请在非系统盘创建，否则会有权限bug</p></blockquote> <p><a data-fancybox="" title="gitblit1" href="/img/blogImage/gitblit1.png"><img src="/img/blogImage/gitblit1.png" alt="gitblit1"></a></p> <h2 id="_4-gitblit配置"><a href="#_4-gitblit配置" class="header-anchor">#</a> 4 GitBlit配置</h2> <h3 id="_4-1-修改defaults-properties文件"><a href="#_4-1-修改defaults-properties文件" class="header-anchor">#</a> 4.1 修改defaults.properties文件</h3> <blockquote><p>找到GitBlit解压目录下的data文件下的defaults.properties文件，并打开，需要修改以下内容</p></blockquote> <div class="language-properties line-numbers-mode"><pre class="language-properties"><code><span class="token attr-name">git.repositoriesFolder</span> <span class="token attr-value"> 赋值为创建好的文件目录D:\Program Files\GitRepository</span>
<span class="token attr-name">server.httpPort</span> <span class="token attr-value"> 设定http协议的端口号</span>
<span class="token attr-name">server.httpBindInterface</span> <span class="token attr-value">设定服务器的IP地址。这里就设定你的服务器IP</span>
<span class="token attr-name">server.httpsBindInterface</span> <span class="token attr-value">设定为localhost</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p><a data-fancybox="" title="gitblit6" href="/img/blogImage/gitblit6.png"><img src="/img/blogImage/gitblit6.png" alt="gitblit6"></a></p> <h4 id="_4-1-1-修改gitblit安装目录"><a href="#_4-1-1-修改gitblit安装目录" class="header-anchor">#</a> 4.1.1 修改GitBlit安装目录</h4> <blockquote><p>在<code>defaults.properties</code>文件中找到<code>git.repositoriesFolder</code>，赋值为创建好的文件目录<code>D:\Program Files\GitRepository</code></p></blockquote> <p><a data-fancybox="" title="gitblit2" href="/img/blogImage/gitblit2.png"><img src="/img/blogImage/gitblit2.png" alt="gitblit2"></a></p> <h4 id="_4-1-2-修改http协议的端口号"><a href="#_4-1-2-修改http协议的端口号" class="header-anchor">#</a> 4.1.2 修改http协议的端口号</h4> <blockquote><p>在<code>defaults.properties</code>文件中找到<code>server.httpPort</code>，设定http协议的端口号</p></blockquote> <p><a data-fancybox="" title="gitblit3" href="/img/blogImage/gitblit3.png"><img src="/img/blogImage/gitblit3.png" alt="gitblit3"></a></p> <h4 id="_4-1-3-修改服务器的ip地址"><a href="#_4-1-3-修改服务器的ip地址" class="header-anchor">#</a> 4.1.3 修改服务器的IP地址</h4> <blockquote><p>在<code>defaults.properties</code>文件中找到<code>server.httpBindInterface</code>，设定服务器的IP地址。这里就设定你的服务器IP</p></blockquote> <p><a data-fancybox="" title="gitblit4" href="/img/blogImage/gitblit4.png"><img src="/img/blogImage/gitblit4.png" alt="gitblit4"></a></p> <h4 id="_4-1-4-修改http连接接口"><a href="#_4-1-4-修改http连接接口" class="header-anchor">#</a> 4.1.4 修改HTTP连接接口</h4> <blockquote><p>在<code>defaults.properties</code>文件中找到<code>server.httpsBindInterface</code>，设定为<code>localhost</code></p></blockquote> <p><a data-fancybox="" title="gitblit4" href="/img/blogImage/gitblit4.png"><img src="/img/blogImage/gitblit4.png" alt="gitblit4"></a></p> <h3 id="_4-2-修改installservice-cmd文件"><a href="#_4-2-修改installservice-cmd文件" class="header-anchor">#</a> 4.2 修改installService.cmd文件</h3> <blockquote><p>修改内容如下</p></blockquote> <div class="language-properties line-numbers-mode"><pre class="language-properties"><code><span class="token attr-name">a.修改</span> <span class="token attr-value">ARCH</span>
 　　32位系统：SET ARCH<span class="token punctuation">=</span>x86
 　　64位系统：SET ARCH<span class="token punctuation">=</span>amd64
<span class="token attr-name">b.添加</span> <span class="token attr-value">CD 为程序目录</span>
 　　SET CD<span class="token punctuation">=</span>F<span class="token punctuation">:</span>\gitblit\gitblit-1.8.0(gitblit所在目录)
c.修改StartParams里的启动参数为空。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><p><a data-fancybox="" title="gitblit5" href="/img/blogImage/gitblit5.png"><img src="/img/blogImage/gitblit5.png" alt="gitblit5"></a></p> <h3 id="_4-3-查看登录用户名密码"><a href="#_4-3-查看登录用户名密码" class="header-anchor">#</a> 4.3 查看登录用户名密码</h3> <blockquote><p>找到GitBlit解压目录下的data文件下的users.conf查看管理员用户名初始密码</p></blockquote> <p><a data-fancybox="" title="gitblit7" href="/img/blogImage/gitblit7.png"><img src="/img/blogImage/gitblit7.png" alt="gitblit7"></a></p> <h2 id="_5-启动gitblit服务"><a href="#_5-启动gitblit服务" class="header-anchor">#</a> 5 启动GitBlit服务</h2> <blockquote><p>待所有配置文件修改完成后，以管理员身份运行installService.cmd ，会将GitBlit安装到Windows系统服务中。
在【计算机--右键】--服务,在其中可以找到gitblit服务，启动即可</p></blockquote> <p><a data-fancybox="" title="gitblit8" href="/img/blogImage/gitblit8.png"><img src="/img/blogImage/gitblit8.png" alt="gitblit8"></a></p> <h2 id="_6-访问gitblit和简单操作"><a href="#_6-访问gitblit和简单操作" class="header-anchor">#</a> 6 访问GitBlit和简单操作</h2> <blockquote><p>在浏览器中打开,<a href="http://192.168.0.5:10123" target="_blank" rel="noopener noreferrer">http://192.168.0.5:10123<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>【这个地址是在上面配置文件中配置的】。用户名<code>admin</code>和密码<code>admin</code>【默认配置位置在 <code>data/users.conf</code>中】</p></blockquote> <p><a data-fancybox="" title="gitblit9" href="/img/blogImage/gitblit9.png"><img src="/img/blogImage/gitblit9.png" alt="gitblit9"></a></p> <h3 id="_6-1-gitblit功能简介"><a href="#_6-1-gitblit功能简介" class="header-anchor">#</a> 6.1 GitBlit功能简介</h3> <p><a data-fancybox="" title="gitblit10" href="/img/blogImage/gitblit10.png"><img src="/img/blogImage/gitblit10.png" alt="gitblit10"></a></p> <h3 id="_6-2-创建版本库"><a href="#_6-2-创建版本库" class="header-anchor">#</a> 6.2 创建版本库</h3> <p><a data-fancybox="" title="gitblit11" href="/img/blogImage/gitblit11.png"><img src="/img/blogImage/gitblit11.png" alt="gitblit11"></a></p> <h3 id="_6-3-git克隆地址"><a href="#_6-3-git克隆地址" class="header-anchor">#</a> 6.3 Git克隆地址</h3> <p><a data-fancybox="" title="gitblit12" href="/img/blogImage/gitblit12.png"><img src="/img/blogImage/gitblit12.png" alt="gitblit12"></a></p> <h3 id="_6-4-更多操作说明"><a href="#_6-4-更多操作说明" class="header-anchor">#</a> 6.4 更多操作说明</h3> <p><a href="http://www.gitblit.com" target="_blank" rel="noopener noreferrer">GitBlit官网操作说明<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/blog/VersionController/IDEA项目版本控制器有svn变成git操作流程.html" class="prev">
        IDEA项目由svn变成git操作流程
      </a></span> <span class="next"><a href="/blog/VersionController/SVN修改远程地址报E155024.html">
        SVN修改远程地址报E155024
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"><!----></div></div>
    <script src="/assets/js/app.1bc80adb.js" defer></script><script src="/assets/js/2.7c0608ab.js" defer></script><script src="/assets/js/46.81b7f108.js" defer></script>
  </body>
</html>
